import wx

class PlayerPanel(wx.Panel):
    def __init__(self, id, player, *args, **kwargs):
        wx.Panel.__init__(self, *args, **kwargs) 
        
        self.text = wx.StaticText(self, wx.ID_ANY, "")

    def update(self, id, player, engine):
        string = "Player: %d %s\n" % (id, player.name)
        for attribute, value in player.attributes.iteritems():
            string += "%s: %d\n" % (str(attribute), value)
        self.text.SetLabel(string)
        
